<template>
	<div class="">
		<data-list :filters="filters" @data-refresh="handleRefresh" :total="total" 
    :pagination-options="paginationOptions"
    >
      <el-table
        :data="tableData"
        style="width: 100%">
        <el-table-column
          prop="createtime"
          label="日期"
          width="180">
        </el-table-column>
        <el-table-column
          prop="name"
          label="姓名"
          width="180">
        </el-table-column>
        <el-table-column
          prop="address"
          label="地址">
        </el-table-column>
      </el-table>
    </data-list>
	</div>
</template>

<script>
import api from '../../api'
export default {
  name: 'hello',
  data () {
    return {
      filters:[
        {
          label:'姓名',
          type:'input',
          field:'name'
        },
        {
          label:'地址',
          type:'input',
          field:'address'
        },
        {
          label:'年代',
          type:'select',
          options:[
            {label:"xxx",value:"xxx"},
            {label:"yyy",value:"yyy"}
          ],
          field:'createtime',
          value:''
        }
      ],
      tableData: [],
      total:null,
      paginationOptions:{}
    }
    
  },
  mounted(){
    
  },
  methods:{
    handleRefresh(params){
      console.log("handleRefresh @@@",params)
      api.dataTest(params).then((res)=>{
         console.log('res',res)
         this.tableData = res.data.rows;
         this.total = res.data.total;
         
      }).catch((err)=>{
        console.log(err)
      })
     
    }
  }
}
</script>

<style scoped>

</style>
